//
//  WLFileSocketManager.h
//  WanLian
//
//  Created by 123456 on 2018/12/24.
//  Copyright © 2018 wanlian. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "WLFileUpDownLoadModel.h"
#import "GCDAsyncSocket.h"
#import "WLFileRequest.h"
NS_ASSUME_NONNULL_BEGIN

@interface WLFileSocketManager : NSObject
decl_single_instance(WLFileSocketManager)
- (WLSocketWorker *)uploadTaskWithModel:(WLFileRequest *)model
                                     progress:(void (^)(float))uploadProgress
                                      success:(void (^)(NSDictionary *successDict))success
                                      failure:(void (^)(NSString *errorMsg, NSInteger errorTag))failure
                                        error:(void (^)(NSError *error))err;

//- (void)suspend;
//
//- (void)cancel;
//
//- (void)start;
- (WLSocketWorker *)downloadTaskWithModel:(WLFileRequest *)model
                                 progress:(void (^)(float process, long expected, long loaded))downloadProgress
                                  success:(void (^)(NSDictionary *successDict))success
                                  failure:(void (^)(NSString *errorMsg, NSInteger errorTag))failure
                                    error:(void (^)(NSError *error))err;
@end

NS_ASSUME_NONNULL_END
